package org.casscommunity.sights.client.view;

import org.casscommunity.sights.client.widget.MessageDialog;
import org.casscommunity.sights.client.widget.editor.PlaceEditor;
import org.casscommunity.sights.shared.domain.PlaceProxy;

import com.google.gwt.requestfactory.client.RequestFactoryEditorDriver;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;

public class DefaultEditPlaceView extends Composite implements EditPlaceView {

	interface DefaultEditPlaceViewUiBinder extends UiBinder<Widget, DefaultEditPlaceView> { }
	interface PlaceEditDriver extends RequestFactoryEditorDriver<PlaceProxy, PlaceEditor> {}

	@UiField(provided=true)
	PlaceEditor editor;
	
	@UiField
	Button saveButton;
	
	@UiField
	Button deleteButton;
	
	private MessageDialog messageBox;
	
	private PlaceEditDriver editorDriver;
	
	@SuppressWarnings("unused")
	private Presenter presenter;
	
	@Inject
	public DefaultEditPlaceView(DefaultEditPlaceViewUiBinder uiBinder, PlaceEditDriver editDriver, PlaceEditor editor) {
		this.editorDriver = editDriver;
		this.editor = editor;
		this.messageBox = new MessageDialog();
		initWidget(uiBinder.createAndBindUi(this));
	}
	
	@Override
	public void setPresenter(Presenter presenter) {
		this.presenter = presenter;
	}

}
